using System;
using System.Data;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using Data=VietStar.Library.Data;
using Entity = VietStar.Library.Entity;
namespace VietStar.Library.Business
{
	/// <summary>
	/// </summary>
	public class SanPham
	{
		public SanPham() {}
		Data.SanPham sanpham= new Data.SanPham();
		public bool Insert(Entity.SanPham entity)
		{
		return sanpham.Insert(entity);
		}
		public DataTable Select(Entity.SanPham entity)
		{
			return sanpham.Select();
		}

        //Select 4 sản phẩm khuyến mãi dùng ngoài templates
        public DataTable TemplateSelectTop4KhuyenMai()
        {
            return sanpham.TemplateSelectTop4KhuyenMai();
        }

        //Select 4 sản phẩm bán chạy dùng ngoài templates
        public DataTable TemplateSelectTop4BanChay()
        {
            return sanpham.TemplateSelectTop4BanChay();
        }

        //Select 4 sản phẩm xem nhiều dùng ngoài templates
        public DataTable TemplateSelectTop4XemNhieu()
        {
            return sanpham.TemplateSelectTop4XemNhieu();
        }

        //Select 4 linh kiện xem nhiều dùng ngoài templates
        public DataTable TemplateSelectTop4LinhKien()
        {
            return sanpham.TemplateSelectTop4LinhKien();
        }

        //Select 4 sản phẩm văn phòng dùng ngoài templates
        public DataTable TemplateSelectTop4SanPhamVanPhong()
        {
            return sanpham.TemplateSelectTop4SanPhamVanPhong();
        }

        //Select 4 máy văn phòng dùng ngoài templates
        public DataTable TemplateSelectTop4MayVanPhong()
        {
            return sanpham.TemplateSelectTop4MayVanPhong();
        }

		public DataTable SelectPrimarykey(Entity.SanPham entity)
		{
			return sanpham.SelectPrimaryKey(entity);
		}
        public DataTable SelectSanPhamByAction(Entity.SanPham entity)
        {
            return sanpham.SelectSanPhamByAction(entity);
        }
        public DataTable SelectSanPhamTimKiemByOpt(Entity.SanPham entity)
        {
            return sanpham.SelectSanPhamTimKiemByOpt(entity);
        }
		public bool Update(Entity.SanPham entity)
		{
			return sanpham.Update(entity);
		}
        public bool UpdateLuotXem(Entity.SanPham entity)
        {
            return sanpham.UpdateLuotXem(entity);
        }
		public bool Delete(Entity.SanPham entity)
		{
			return sanpham.Delete(entity);
		}
        public DataTable SelectTimKiem(Entity.SanPham entity)
        {
            return sanpham.SelectTimKiem(entity);
        }
	}
}
